using UnityEngine;
using System.Collections;

/// \class  gkUtilityScreenObjectBounds
/// \brief  Compute screen object bounds
public class gkUtilityScreenObjectBounds 
{
	/// \brief  Test if a game object contains a screen point
	public static bool ContainsScreenPoint(GameObject a_rGameObject, Vector2 a_f2ScreenPosition)
	{
		gkScreenTransform rScreenTransform;

		// Try to get the screen transform
		rScreenTransform = a_rGameObject.GetComponent<gkScreenTransform>();
		if(rScreenTransform == null)
		{
			return false;
		}
		else
		{	
			return rScreenTransform.ContainsScreenPoint(a_f2ScreenPosition);
		}
	}
}
